<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc.">
        <meta name="author" content="Coderthemes">

        <link rel="shortcut icon" href="__STATIC__/assets/images/favicon.ico">

        <title>Adminto - Responsive Admin Dashboard Template</title>
        <!--Layui-->
        <link href="__STATIC__/layui/css/layui.css" rel="stylesheet" type="text/css" />
        <!--Morris Chart CSS -->
        <link rel="stylesheet" href="__STATIC__/assets/plugins/morris/morris.css">
        <!-- Plugins css-->
        <link href="__STATIC__/assets/plugins/bootstrap-tagsinput/dist/bootstrap-tagsinput.css" rel="stylesheet" />
        <link href="__STATIC__/assets/plugins/multiselect/css/multi-select.css"  rel="stylesheet" type="text/css" />
        <link href="__STATIC__/assets/plugins/select2/dist/css/select2.css" rel="stylesheet" type="text/css">
        <link href="__STATIC__/assets/plugins/select2/dist/css/select2-bootstrap.css" rel="stylesheet" type="text/css">
        <link href="__STATIC__/assets/plugins/bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.css" rel="stylesheet" />
        <link href="__STATIC__/assets/plugins/switchery/switchery.min.css" rel="stylesheet" />
        <link href="__STATIC__/assets/plugins/timepicker/bootstrap-timepicker.min.css" rel="stylesheet">
        <link href="__STATIC__/assets/plugins/mjolnic-bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css" rel="stylesheet">
        <link href="__STATIC__/assets/plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css" rel="stylesheet">
        <link href="__STATIC__/assets/plugins/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">
        <!-- App css -->
        <link href="__STATIC__/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="__STATIC__/assets/css/icons.css" rel="stylesheet" type="text/css" />
        <link href="__STATIC__/assets/css/style.css" rel="stylesheet" type="text/css" />

        <script src="__STATIC__/assets/js/modernizr.min.js"></script>

        <link href="__STATIC__/assets/plugins/responsive-table/css/rwd-table.min.css" rel="stylesheet" type="text/css" media="screen">

        <!-- App css -->
        <link href="__STATIC__assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="__STATIC__assets/css/icons.css" rel="stylesheet" type="text/css" />
        <link href="__STATIC__assets/css/style.css" rel="stylesheet" type="text/css" />

        <script src="__STATIC__/assets/js/modernizr.min.js"></script>
        <style>
            table th{
                text-align: center;
            }
            table td{
                text-align: center;
                white-space:inherit;
            }
        </style>
    </head>


    <body class="fixed-left">

        <!-- Begin page -->
        <div id="wrapper">

            <!-- Top Bar Start -->
            <div class="topbar">

                <!-- LOGO -->
                <div class="topbar-left">
                    <a href="{:url('Index/index')}" class="logo"><span>do,re,<span>mi</span></span><i class="mdi mdi-layers"></i></a>
                </div>

                <!-- Button mobile view to collapse sidebar menu -->
                <div class="navbar navbar-default" role="navigation">
                    <div class="container-fluid">

                        <!-- Page title -->
                        <ul class="nav navbar-nav list-inline navbar-left">
                            <li class="list-inline-item">
                                <button class="button-menu-mobile open-left">
                                    <i class="mdi mdi-menu"></i>
                                </button>
                            </li>
                            <li class="list-inline-item">
                                <h4 class="page-title">{$title} :</h4>
                            </li>
                        </ul>

                        <nav class="navbar-custom">

                            <ul class="list-unstyled topbar-right-menu float-right mb-0">

                                <li>
                                    <!-- Notification -->
                                    <div class="notification-box">
                                        <ul class="list-inline mb-0">
                                            <li>
                                                <a href="javascript:void(0);" class="right-bar-toggle">
                                                    <i class="mdi mdi-bell-outline noti-icon"></i>
                                                </a>
                                                <div class="noti-dot">
                                                    <span class="dot"></span>
                                                    <span class="pulse"></span>
                                                </div>
                                            </li>
                                        </ul>
                                    </div>
                                    <!-- End Notification bar -->
                                </li>

                                <li class="hide-phone">
                                    <form class="app-search">
                                        <input type="text" placeholder="搜索..."
                                               class="form-control">
                                        <button type="submit"><i class="fa fa-search"></i></button>
                                    </form>
                                </li>

                            </ul>
                        </nav>
                    </div><!-- end container -->
                </div><!-- end navbar -->
            </div>
            <!-- Top Bar End -->


            <!-- ========== Left Sidebar Start ========== -->
            {include file="public/left"}
            <!-- Left Sidebar End -->



            <!-- ============================================================== -->
            <!-- Start right Content here -->
            <!-- ============================================================== -->
            <div class="content-page">
                <!-- Start content -->
                <div class="content">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-12">
                                <div class="card-box">

                                    <div class="table-rep-plugin">
                                        <div class="table-responsive" data-pattern="priority-columns">
                                            <table id="tech-companies-1" class="table  table-striped">
                                                <thead>
                                                <tr>
                                                    <!-- <th>序号</th> -->
                                                    <th data-priority="1">封面</th>
                                                    <th data-priority="3">名称</th>
                                                    
                                                    <th data-priority="3">数量</th>
                                                    <th data-priority="3">单位</th>
                                                    <th data-priority="3">单价</th>
                                                    <th data-priority="3">销量</th>
                                                    <th data-priority="1">简介</th>
                                                    <th data-priority="3">是否上架</th>
                                                    <th data-priority="3">操作</th>
                                                    
                                                </tr>
                                                </thead>
                                                <tbody>
                                                {volist name="list" id="v"}
                                                <tr>
                                                   <!-- <td>{$v.id}</td> -->
                                                   <td><img src="__ROOT__/{$v.img}" alt="" style="width:100px;height:100px;"></td>
                                                   <td>{$v.name}</td>
                                                   
                                                   <td style="color:#FF9966">{$v.number}</td>
                                                   <td>/{$v.com}</td>
                                                   <td style="color:red;font-size: 16px;">$ <input type="text" value="{$v.unit}" style="border:none;width:35px;color:red">/元</td>
                                                   <td><input type="text" value="{$v.sales}" style="border:none;width:30px;"></td>
                                                   <!-- <td>{$v.name}</td> -->
                                                   <td style="text-align:center"><p style="white-space:pre-wrap;width:200px;margin-left: 40px;">{$v.content}</p></td>
                                                   <td><input type="checkbox" checked data-plugin="switchery" data-color="#00b19d"/></td>
                                                   <td>
                                                    <div class="btn btn-icon waves-effect waves-light btn-danger m-b-5" style="border:1px solid #ccc;border-radius: 100px;" onclick="del({$v.id},this)"> <i class="fa fa-remove"></i> </div>
                                                    <button class="btn btn-icon waves-effect waves-light btn-warning m-b-5" style="border:1px solid #ccc;border-radius: 100px;"> <i class="fa fa-wrench"></i> </button>

                                                   </td>
                                                </tr>
                                                {/volist}
                                                </tbody>
                                            </table>
                                        </div>

                                    </div>

                                </div>
                            </div>
                        </div>
                        <!-- end row -->
                    </div> <!-- container -->

                </div> <!-- content -->

                <footer class="footer text-right">
                    2016 - 2018 © Adminto. Coderthemes.com
                </footer>

            </div>


            <!-- ============================================================== -->
            <!-- End Right content here -->
            <!-- ============================================================== -->


            <!-- Right Sidebar -->
            
            <!-- /Right-bar -->

        </div>
        <!-- END wrapper -->
    
     

        <!-- responsive-table-->
        <script src="__STATIC__/assets/plugins/responsive-table/js/rwd-table.min.js" type="text/javascript"></script>
        <!-- jQuery  -->
        <script src="__STATIC__/assets/js/jquery.min.js"></script>
        <script src="__STATIC__/assets/js/popper.min.js"></script>
        <script src="__STATIC__/assets/js/bootstrap.min.js"></script>
        <script src="__STATIC__/assets/js/detect.js"></script>
        <script src="__STATIC__/assets/js/fastclick.js"></script>
        <script src="__STATIC__/assets/js/jquery.blockUI.js"></script>
        <script src="__STATIC__/assets/js/waves.js"></script>
        <script src="__STATIC__/assets/js/jquery.nicescroll.js"></script>
        <script src="__STATIC__/assets/js/jquery.slimscroll.js"></script>
        <script src="__STATIC__/assets/js/jquery.scrollTo.min.js"></script>
        <!-- Plugins Js -->
        <script src="__STATIC__/assets/plugins/switchery/switchery.min.js"></script>
        <script src="__STATIC__/assets/plugins/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js"></script>
        <script type="text/javascript" src="__STATIC__/assets/plugins/multiselect/js/jquery.multi-select.js"></script>
        <script type="text/javascript" src="__STATIC__/assets/plugins/jquery-quicksearch/jquery.quicksearch.js"></script>
        <script src="__STATIC__/assets/plugins/select2/dist/js/select2.min.js" type="text/javascript"></script>
        <script src="__STATIC__/assets/plugins/bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.js" type="text/javascript"></script>
        <script src="__STATIC__/assets/plugins/bootstrap-inputmask/bootstrap-inputmask.min.js" type="text/javascript"></script>
        <script src="__STATIC__/assets/plugins/moment/moment.js"></script>
        <script src="__STATIC__/assets/plugins/timepicker/bootstrap-timepicker.min.js"></script>
        <script src="__STATIC__/assets/plugins/mjolnic-bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min.js"></script>
        <script src="__STATIC__/assets/plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
        <script src="__STATIC__/assets/plugins/bootstrap-daterangepicker/daterangepicker.js"></script>
        <script src="__STATIC__/assets/plugins/bootstrap-maxlength/bootstrap-maxlength.min.js" type="text/javascript"></script>
        <!-- KNOB JS -->
        <!--[if IE]>
        <script type="text/javascript" src="__STATIC__/assets/plugins/jquery-knob/excanvas.js"></script>
        <![endif]-->
        <script src="__STATIC__/assets/plugins/jquery-knob/jquery.knob.js"></script>

        <!--Morris Chart-->
        <script src="__STATIC__/assets/plugins/morris/morris.min.js"></script>
        <script src="__STATIC__/assets/plugins/raphael/raphael-min.js"></script>

        <!-- Dashboard init -->
        <script src="__STATIC__/assets/pages/jquery.dashboard.js"></script>

        <!-- App js -->
        <script src="__STATIC__/assets/js/jquery.core.js"></script>
        <script src="__STATIC__/assets/js/jquery.app.js"></script>
        <script src="__STATIC__/layer/layer.js"></script>
        <script> 
            function tiao(id,obj)
            {
                // console.log(id);
                location.href="{:url('Commodity/paging')}"+'?id='+id;
                
            }

            function del(id,obj)
            {
                // console.log(id);
                //询问框
                layer.confirm('确定提交么 ( ・◇・)？', {
                  btn: ['确定','取消'] //按钮
                }, function(){
                     $.ajax({
                         type: "POST",
                         url:"{:url('Commodity/recycle')}",
                         data:{"id":id},// 要提交的表单 
                         beforeSend:function(){
                               layer.load(0, {shade: false});
                            },
                         success: function(msg) {
                            console.log(msg);
                            if (msg == 1111) {
                                layer.msg('删除成功~', {icon: 1});
                                history.go(0); 
                            }else{
                                layer.msg('删除失败', {icon: 2});
                            }
                         },
                         complete: function() {
                                 layer.closeAll('loading');
                            }
                     });
                 
                }, function(){
                    layer.msg(' (｡・`ω´･) 再见');
                });   
            }
            $(function() {
                $('.table-responsive').responsiveTable({
                    addDisplayAllBtn: 'btn btn-secondary'
                });

            });
        </script>
    </body>
</html>